package com.atguigu.gulimallcart.service;

import com.atguigu.gulimallcart.vo.Cart;
import com.atguigu.gulimallcart.vo.CartItem;

import java.util.List;

public interface CartService {
    /**
     * 将商品添加到购物车
     * @param skuId
     * @param num
     * @return
     */
    CartItem addToCart(Long skuId, Integer num);

    /**
     * 获取购物车某个购物项
     * @param skuId
     * @return
     */
    CartItem getCartItem(Long skuId);

    /**
     * 获取用户购物车列表
     * @return
     */
    Cart getCart();

    void checkItem(Long skuId, Integer check);

    void changeNum(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> currentUserItems();
}
